package com.dc.datacollect.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * 关联
 * @TableName collect_group
 */
@Data
public class CollectGroup implements Serializable {
    /**
     * 收集组id
     */
    private Long groupId;

    /**
     * 收集表_收集信息表id
     */
    private Long collectId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CollectGroup that = (CollectGroup) o;
        return Objects.equals(groupId, that.groupId) && Objects.equals(collectId, that.collectId) && Objects.equals(gmtCreate, that.gmtCreate) && Objects.equals(gmtModified, that.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(groupId, collectId, gmtCreate, gmtModified);
    }

    @Override
    public String toString() {
        return "CollectGroup{" +
                "id=" + groupId +
                ", collectId=" + collectId +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}